import api from '@/api/index.ts'

// 获取活动落地页配置列表
export function GetCollectionData(params: any) {
  return api.get('/api/act/collection/list', { params })
}
// 获取配置ID选项
export function GetIdOption() {
  return api.get('/api/act/collection/optionlist')
}
// 获取配置详情
export function GetDataDetail(id: string) {
  return api.get(`/api/act/collection/detail/${id}`)
}
// 添加配置
export function PostCreateData(params: any) {
  return api.post('/api/act/collection/create', params)
}
// 编辑配置
export function PutModifyData(params: any) {
  return api.put('/api/act/collection/modify', params)
}
// 修改配置状态
export function PatchModifyType(params: any) {
  return api.patch('/api/act/collection/modifyactstatus', params)
}
// 获取分类关联子项配置详情
export function GetCategoryDetail(id: string) {
  return api.get(`/api/act/collection/categoryitem/detail/${id}`)
}
// 配置分类关联子项
export function PostCategoryItem(params: any) {
  return api.post('/api/act/collection/modifycategoryitem', params)
}
// 删除分类或分类关联子项
export function DeleteItem(id: any) {
  return api.delete(`/api/act/collection/delete/item/${id}`)
}
